Skip to content

Comments

Reduce complexity in dependencies setup#15169

Open
jjohannes wants to merge 36 commits intomainfrom
reduce-complexity-in-dependencies-setup
Open

Reduce complexity in dependencies setup#15169
jjohannes wants to merge 36 commits intomainfrom
reduce-complexity-in-dependencies-setup

Conversation

@jjohannes
Copy link
Collaborator

@jjohannes jjohannes commented Feb 20, 2026

Related issues and pull requests

PR Description

As follow up to earlier updates on dependency management in the JabRef repo, with the goal to remove as much unnecessary complexity as possible from the dependencies setup. For that, this PR activates the full capabilities of the java-module-dependencies plugin, which is:

  • defining dependencies only through module-info.java files, effectively removing the redundant dependencies {} blocks from build.gradle.kts files
  • activates the integration with the dependency-analysis-gradle-plugin plugin that enableds the checkAllModuleInfo to check if the declarations in a module-info.java file are consistent with what is used (or not used) in the source code of the corresponding module.

The PR removes or updates declarations depending on the advice checkAllModuleInfo gives.

Steps to test

After this change, everything should build like before, but the module paths should be reduced to what is actually needed.

There is a risk that this accidentally removes a needed runtime only dependency that is not covered by tests (I'll try to be thorough). The checkAllModuleInfo task can not know all things that are dynamically loaded at runtime. So some manual testing before integrating this would be good.

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • [/] I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@testlens-app
Copy link

testlens-app bot commented Feb 20, 2026

🚨 TestLens detected 36 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Check Project/Task Test Runs
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitleWithCurlyBracket()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > supportsPhraseSearch()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String) > 1 "performSearchByIdReturnsCorrectEntryForArXivId"
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrawlerTest > whetherAllFilesAreCreated()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > performSearchByIdFindsPaperWithoutTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest DBLPFetcherTest > findSingleEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest DBLPFetcherTest > findSingleEntryUsingComplexOperators()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example1"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example2"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example3"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example4"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchWithEmptyStringTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > extractsReferencesFromPdf()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processEmptyStringTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processPdfTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processValidCitationTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > author()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > checkThesis()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > noResults()
Fetcher Tests / Fetcher tests :jablib:fetcherTest LibraryOfCongressTest > performSearchById()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > searchByIDSari()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > getURLForQueryBuildsSearchUrl()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > getURLForQueryWithLucene()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > parserParsesResultsArray()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > parserParsesSingleWorkObject()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > searchByQueryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > searchByQuotedQueryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > fetchArxivInformationForPdfWithArxivId()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > importRelativizesFilePath()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > pdfMetadataExtractedFrom2024SPLCBecker()
Fetcher Tests / Fetcher tests :jablib:fetcherTest SemanticScholarTest > getDocument()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > test429ErrorThrowsFetcherClientException()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > test503ErrorThrowsFetcherServerException()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByEntryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByIdInEntryFindsEntry()

🏷️ Commit: 4cd72a8
▶️ Tests: 10405 executed
⚪️ Checks: 53/53 completed

Test Failures (first 5 of 36)

ArXivFetcherTest > findFullTextByTitleWithCurlyBracket() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/2010.15942v3]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitleWithCurlyBracket(ArXivFetcherTest.java:236)
expected actual
Optional~[https://arxiv~.org/pdf/2010.15942v3] Optional.empty
ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <[@article{https://doi.org/10.48550/arxiv.1405.2249,
  abstract = {A general slice theorem for the action of a Fréchet Lie group on a Fréchet manifolds is established. The Nash-Moser theorem provides the fundamental tool to generalize the result of Palais to this infinite-dimensional setting. The presented slice theorem is illustrated by its application to gauge theories: the action of the gauge transformation group admits smooth slices at every point and thus the gauge orbit space is stratified by Fréchet manifolds. Furthermore, a covariant and symplectic formulation of classical field theory is proposed and extensively discussed. At the root of this novel framework is the incorporation of field degrees of freedom F and spacetime M into the product manifold F * M. The induced bigrading of differential forms is used in order to carry over the usual symplectic theory to this new setting. The examples of the Klein-Gordon field and general Yang-Mills theory illustrate that the presented approach conveniently handles the occurring symmetries.},
  author = {Diez, Tobias},
  copyright = {arXiv.org perpetual, non-exclusive license},
  date = {2014-05-09},
  doi = {10.48550/ARXIV.1405.2249},
  eprint = {1405.2249},
  eprintclass = {math-ph},
  eprinttype = {arXiv},
  file = {:https\://arxiv.org/pdf/1405.2249v1:PDF},
  keywords = {Mathematical Physics (math-ph), Differential Geometry (math.DG), Symplectic Geometry (math.SG), FOS: Physical sciences, FOS: Mathematics, 58B99, 58Z05, 58B25, 22E65, 58D19, 53D20, 53D42},
  publisher = {arXiv},
  title = {Slice theorem for Fréchet group actions and covariant symplectic field theory},
  year = {2014},
  _jabref_shared = {sharedId: -1, version: 1}
}]> but was: <[]>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.searchEntryByPartOfTitleWithAcuteAccent(ArXivFetcherTest.java:309)
expected actual
[@Article{https://doi.org/10.48550/arxiv.1405.2249, []
~ abstract = {A general slice theorem for the action of a Fréchet Lie group on a Fréchet manifolds is established. The Nash-Moser theorem provides the fundamental tool to generalize the result of Palais to this infinite-dimensional setting. The presented slice theorem is illustrated by its application to gauge theories: the action of the gauge transformation group admits smooth slices at every point and thus the gauge orbit space is stratified by Fréchet manifolds. Furthermore, a covariant and symplectic formulation of classical field theory is proposed and extensively discussed. At the root of this novel framework is the incorporation of field degrees of freedom F and spacetime M into the product manifold F * M. The induced bigrading of differential forms is used in order to carry over the usual symplectic theory to this new setting. The examples of the Klein-Gordon field and general Yang-Mills theory illustrate that the presented approach conveniently handles the occurring symmetries.},~
~ author = {Diez, Tobias},~
~ copyright = {arXiv.org perpetual, non-exclusive license},~
~ date = {2014-05-09},~
~ doi = {10.48550/ARXIV.1405.2249},~
~ eprint = {1405.2249},~
~ eprintclass = {math-ph},~
~ eprinttype = {arXiv},~
~ file = {:https://arxiv.org/pdf/1405.2249v1:PDF},~
~ keywords = {Mathematical Physics (math-ph), Differential Geometry (math.DG), Symplectic Geometry (math.SG), FOS: Physical sciences, FOS: Mathematics, 58B99, 58Z05, 58B25, 22E65, 58D19, 53D20, 53D42},~
~ publisher = {arXiv},~
~ title = {Slice theorem for Fréchet group actions and covariant symplectic field theory},~
~ year = {2014},~
~ _jabref_shared = {sharedId: -1, version: 1}~
}]
ArXivFetcherTest > supportsPhraseSearch() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.jabref.logic.importer.FetcherException: arXiv API request failed
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.getException(ArXivFetcher.java:559)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:530)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.queryApi(ArXivFetcher.java:477)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.searchForEntries(ArXivFetcher.java:472)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.performSearchPaged(ArXivFetcher.java:580)
	at org.jabref.logic.importer.fetcher.ArXivFetcher.performSearchPaged(ArXivFetcher.java:315)
	at org.jabref.logic.importer.PagedSearchBasedFetcher.performSearch(PagedSearchBasedFetcher.java:48)
	at org.jabref.logic.importer.SearchBasedFetcher.performSearch(SearchBasedFetcher.java:48)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.supportsPhraseSearch(ArXivFetcherTest.java:415)
CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String) > 1 "performSearchByIdReturnsCorrectEntryForArXivId" (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[@article{Cunningham_2022,
  abstract = {In the era of large-scale spectroscopic surveys in the Local Group (LG), we can explore using chemical abundances of halo stars to study the star formation and chemical enrichment histories of the dwarf galaxy progenitors of the Milky Way (MW) and M31 stellar halos. In this paper, we investigate using the Chemical Abundance Ratio Distributions (CARDs) of seven stellar halos from the Latte suite of FIRE-2 simulations. We attempt to infer galaxies' assembly histories by modelling the CARDs of the stellar halos of the Latte galaxies as a linear combination of template CARDs from disrupted dwarfs, with different stellar masses $M_{\star}$ and quenching times $t_{100}$. We present a method for constructing these templates using present-day dwarf galaxies. For four of the seven Latte halos studied in this work, we recover the mass spectrum of accreted dwarfs to a precision of $<10\%$. For the fraction of mass accreted as a function of $t_{100}$, we find residuals of $20-30\%$ for five of the seven simulations. We discuss the failure modes of this method, which arise from the diversity of star formation and chemical enrichment histories dwarf galaxies can take. These failure cases can be robustly identified by the high model residuals. Though the CARDs modeling method does not successfully infer the assembly histories in these cases, the CARDs of these disrupted dwarfs contain signatures of their unusual formation histories. Our results are promising for using CARDs to learn more about the histories of the progenitors of the MW and M31 stellar halos.},
  author = {Cunningham, Emily C. and Sanderson, Robyn E. and Johnston, Kathryn V. and Panithanpaisal, Nondh and Ness, Melissa K. and Wetzel, Andrew and Loebman, Sarah R. and Escala, Ivanna and Horta, Danny and Faucher-Giguère, Claude-André},
  copyright = {Creative Commons Attribution 4.0 International},
  date = {2021-10-06},
  doi = {10.3847/1538-4357/ac78ea},
  eprint = {2110.02957},
  eprintclass = {astro-ph.GA},
  eprinttype = {arXiv},
  file = {:http\://arxiv.org/pdf/2110.02957v1:PDF},
  issn = {1538-4357},
  journal = {The Astrophysical Journal},
  keywords = {Astrophysics of Galaxies (astro-ph.GA), FOS: Physical sciences},
  month = {#aug#},
  number = {2},
  pages = {172},
  publisher = {American Astronomical Society},
  title = {Reading the CARDs: the Imprint of Accretion History in the Chemical Abundances of the Milky Way's Stellar Halo},
  volume = {934},
  year = {2021},
  _jabref_shared = {sharedId: -1, version: 1}
}]> but was: <Optional[@article{Cunningham_2022,
  abstract = {In the era of large-scale spectroscopic surveys in the Local Group (LG), we can explore using chemical abundances of halo stars to study the star formation and chemical enrichment histories of the dwarf galaxy progenitors of the Milky Way (MW) and M31 stellar halos. In this paper, we investigate using the Chemical Abundance Ratio Distributions (CARDs) of seven stellar halos from the Latte suite of FIRE-2 simulations. We attempt to infer galaxies' assembly histories by modelling the CARDs of the stellar halos of the Latte galaxies as a linear combination of template CARDs from disrupted dwarfs, with different stellar masses $M_{\star}$ and quenching times $t_{100}$. We present a method for constructing these templates using present-day dwarf galaxies. For four of the seven Latte halos studied in this work, we recover the mass spectrum of accreted dwarfs to a precision of $<10\%$. For the fraction of mass accreted as a function of $t_{100}$, we find residuals of $20-30\%$ for five of the seven simulations. We discuss the failure modes of this method, which arise from the diversity of star formation and chemical enrichment histories dwarf galaxies can take. These failure cases can be robustly identified by the high model residuals. Though the CARDs modeling method does not successfully infer the assembly histories in these cases, the CARDs of these disrupted dwarfs contain signatures of their unusual formation histories. Our results are promising for using CARDs to learn more about the histories of the progenitors of the MW and M31 stellar halos.},
  author = {Cunningham, Emily C. and Sanderson, Robyn E. and Johnston, Kathryn V. and Panithanpaisal, Nondh and Ness, Melissa K. and Wetzel, Andrew and Loebman, Sarah R. and Escala, Ivanna and Horta, Danny and Faucher-Giguère, Claude-André},
  copyright = {Creative Commons Attribution 4.0 International},
  date = {2021-10-06},
  doi = {10.3847/1538-4357/ac78ea},
  eprint = {2110.02957},
  eprintclass = {astro-ph.GA},
  eprinttype = {arXiv},
  file = {:https\://arxiv.org/pdf/2110.02957v1:PDF},
  issn = {1538-4357},
  journal = {The Astrophysical Journal},
  keywords = {Astrophysics of Galaxies (astro-ph.GA), FOS: Physical sciences},
  month = {#aug#},
  number = {2},
  pages = {172},
  publisher = {American Astronomical Society},
  title = {Reading the CARDs: the Imprint of Accretion History in the Chemical Abundances of the Milky Way's Stellar Halo},
  volume = {934},
  year = {2021},
  _jabref_shared = {sharedId: -1, version: 1}
}]>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.CompositeIdFetcherTest.performSearchByIdReturnsCorrectEntryForIdentifier(CompositeIdFetcherTest.java:134)
expected actual
Optional[@Article{Cunningham_2022, Optional[@Article{Cunningham_2022,
abstract = {In the era of large-scale spectroscopic surveys in the Local Group (LG), we can explore using chemical abundances of halo stars to study the star formation and chemical enrichment histories of the dwarf galaxy progenitors of the Milky Way (MW) and M31 stellar halos. In this paper, we investigate using the Chemical Abundance Ratio Distributions (CARDs) of seven stellar halos from the Latte suite of FIRE-2 simulations. We attempt to infer galaxies' assembly histories by modelling the CARDs of the stellar halos of the Latte galaxies as a linear combination of template CARDs from disrupted dwarfs, with different stellar masses $M_{\star}$ and quenching times $t_{100}$. We present a method for constructing these templates using present-day dwarf galaxies. For four of the seven Latte halos studied in this work, we recover the mass spectrum of accreted dwarfs to a precision of $&lt;10%$. For the fraction of mass accreted as a function of $t_{100}$, we find residuals of $20-30%$ for five of the seven simulations. We discuss the failure modes of this method, which arise from the diversity of star formation and chemical enrichment histories dwarf galaxies can take. These failure cases can be robustly identified by the high model residuals. Though the CARDs modeling method does not successfully infer the assembly histories in these cases, the CARDs of these disrupted dwarfs contain signatures of their unusual formation histories. Our results are promising for using CARDs to learn more about the histories of the progenitors of the MW and M31 stellar halos.}, abstract = {In the era of large-scale spectroscopic surveys in the Local Group (LG), we can explore using chemical abundances of halo stars to study the star formation and chemical enrichment histories of the dwarf galaxy progenitors of the Milky Way (MW) and M31 stellar halos. In this paper, we investigate using the Chemical Abundance Ratio Distributions (CARDs) of seven stellar halos from the Latte suite of FIRE-2 simulations. We attempt to infer galaxies' assembly histories by modelling the CARDs of the stellar halos of the Latte galaxies as a linear combination of template CARDs from disrupted dwarfs, with different stellar masses $M_{\star}$ and quenching times $t_{100}$. We present a method for constructing these templates using present-day dwarf galaxies. For four of the seven Latte halos studied in this work, we recover the mass spectrum of accreted dwarfs to a precision of $&lt;10%$. For the fraction of mass accreted as a function of $t_{100}$, we find residuals of $20-30%$ for five of the seven simulations. We discuss the failure modes of this method, which arise from the diversity of star formation and chemical enrichment histories dwarf galaxies can take. These failure cases can be robustly identified by the high model residuals. Though the CARDs modeling method does not successfully infer the assembly histories in these cases, the CARDs of these disrupted dwarfs contain signatures of their unusual formation histories. Our results are promising for using CARDs to learn more about the histories of the progenitors of the MW and M31 stellar halos.},
author = {Cunningham, Emily C. and Sanderson, Robyn E. and Johnston, Kathryn V. and Panithanpaisal, Nondh and Ness, Melissa K. and Wetzel, Andrew and Loebman, Sarah R. and Escala, Ivanna and Horta, Danny and Faucher-Giguère, Claude-André}, author = {Cunningham, Emily C. and Sanderson, Robyn E. and Johnston, Kathryn V. and Panithanpaisal, Nondh and Ness, Melissa K. and Wetzel, Andrew and Loebman, Sarah R. and Escala, Ivanna and Horta, Danny and Faucher-Giguère, Claude-André},
copyright = {Creative Commons Attribution 4.0 International}, copyright = {Creative Commons Attribution 4.0 International},
date = {2021-10-06}, date = {2021-10-06},
doi = {10.3847/1538-4357/ac78ea}, doi = {10.3847/1538-4357/ac78ea},
eprint = {2110.02957}, eprint = {2110.02957},
eprintclass = {astro-ph.GA}, eprintclass = {astro-ph.GA},
eprinttype = {arXiv}, eprinttype = {arXiv},
file = {:http://arxiv.org/pdf/2110.02957v1:PDF}, file = {:https://arxiv.org/pdf/2110.02957v1:PDF},
issn = {1538-4357}, issn = {1538-4357},
journal = {The Astrophysical Journal}, journal = {The Astrophysical Journal},
keywords = {Astrophysics of Galaxies (astro-ph.GA), FOS: Physical sciences}, keywords = {Astrophysics of Galaxies (astro-ph.GA), FOS: Physical sciences},
month = {#aug#}, month = {#aug#},
number = {2}, number = {2},
pages = {172}, pages = {172},
publisher = {American Astronomical Society}, publisher = {American Astronomical Society},
title = {Reading the CARDs: the Imprint of Accretion History in the Chemical Abundances of the Milky Way's Stellar Halo}, title = {Reading the CARDs: the Imprint of Accretion History in the Chemical Abundances of the Milky Way's Stellar Halo},
volume = {934}, volume = {934},
year = {2021}, year = {2021},
_jabref_shared = {sharedId: -1, version: 1} _jabref_shared = {sharedId: -1, version: 1}
}] }]
CrawlerTest > whetherAllFilesAreCreated() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:69)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:41)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:195)
	at org.jabref.logic.crawler.CrawlerTest.lambda$whetherAllFilesAreCreated$0(CrawlerTest.java:110)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.jabref.logic.crawler.CrawlerTest.whetherAllFilesAreCreated(CrawlerTest.java:108)
expected actual
true false

Muted Tests

Select tests to mute in this pull request:

  • ArXivFetcherTest > findFullTextByTitleWithCurlyBracket()
  • ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent()
  • ArXivFetcherTest > supportsPhraseSearch()
  • CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String)
  • CrawlerTest > whetherAllFilesAreCreated()
  • CrossRefTest > performSearchByIdFindsPaperWithoutTitle()
  • DBLPFetcherTest > findSingleEntry()
  • DBLPFetcherTest > findSingleEntryUsingComplexOperators()
  • GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String)
  • GrobidPlainCitationParserTest > grobidPerformSearchWithEmptyStringTest()
  • GrobidServiceTest > extractsReferencesFromPdf()
  • GrobidServiceTest > processEmptyStringTest()
  • GrobidServiceTest > processPdfTest()
  • GrobidServiceTest > processValidCitationTest()
  • ISIDOREFetcherTest > author()
  • ISIDOREFetcherTest > checkThesis()
  • ISIDOREFetcherTest > noResults()
  • LibraryOfCongressTest > performSearchById()
  • MedlineFetcherTest > searchByIDSari()
  • OpenAlexFetcherTest > getURLForQueryBuildsSearchUrl()
  • OpenAlexFetcherTest > getURLForQueryWithLucene()
  • OpenAlexFetcherTest > parserParsesResultsArray()
  • OpenAlexFetcherTest > parserParsesSingleWorkObject()
  • OpenAlexFetcherTest > searchByQueryFindsEntry()
  • OpenAlexFetcherTest > searchByQuotedQueryFindsEntry()
  • PdfMergeMetadataImporterTest > fetchArxivInformationForPdfWithArxivId()
  • PdfMergeMetadataImporterTest > importRelativizesFilePath()
  • PdfMergeMetadataImporterTest > pdfMetadataExtractedFrom2024SPLCBecker()
  • SemanticScholarTest > getDocument()
  • URLDownloadTest > test429ErrorThrowsFetcherClientException()
  • URLDownloadTest > test503ErrorThrowsFetcherServerException()
  • ZbMATHTest > searchByEntryFindsEntry()
  • ZbMATHTest > searchByIdInEntryFindsEntry()

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@koppor
Copy link
Member

koppor commented Feb 20, 2026

Need an AI which immediatly says to me, why JabRef needs a kotlin stdlib :)

   > Could not find org.apache.httpcomponents.core5:httpcore5:.
     Required by:
         project ':jabls-cli' > project :jablib
   > Could not find org.jetbrains.kotlin:kotlin-stdlib:.
     Required by:
         project ':jabls-cli' > project :jablib

@jjohannes
Copy link
Collaborator Author

@koppor not AI, but this issue shows which kind of accidentally introduced dependencies can be caught by the analysis if you would turn it on as a regular check after this PR is done:

a2dcb13

@jjohannes jjohannes force-pushed the reduce-complexity-in-dependencies-setup branch from bfc3604 to 987b080 Compare February 20, 2026 10:47
@jjohannes jjohannes force-pushed the reduce-complexity-in-dependencies-setup branch from 987b080 to 8898165 Compare February 20, 2026 10:55
@koppor
Copy link
Member

koppor commented Feb 20, 2026

These json object thingies are due to JDK25 vs JDK26 and JavaFX. We could switch to JDK26-EA 😇

Update: OK, I saw cef941a

@jjohannes jjohannes force-pushed the reduce-complexity-in-dependencies-setup branch from 53297d9 to 589e47a Compare February 20, 2026 15:22
@jjohannes
Copy link
Collaborator Author

@koppor do you have a clue how this can happen:

Run jbang build ".jbang/JabKitLauncher.java"
[jbang] Resolving dependencies...
[jbang]    org.jabref:jablib:6.0-SNAPSHOT
[jbang]    info.picocli:picocli:4.7.7
[jbang] Dependencies resolved
[jbang] Building jar for JabKitLauncher.java...
/home/runner/work/jabref/jabref/jabkit/src/main/java/module-info.java:2: error: module not found: org.jabref.jablib
    requires org.jabref.jablib;

Is this maybe a pipeline configuration issue that already exists and that this PR only shows because it made changes in the jabkit module?
I could imagine that the dependency list may need adjustment after this change, due to less things visible transitively. But why can't it find org.jabref.jablib itself after it said org.jabref:jablib:6.0-SNAPSHOT?

Or is this a known problem I can ignore?

@koppor
Copy link
Member

koppor commented Feb 20, 2026

Or is this a known problem I can ignore?

Just move on. I bet that the jar snapshot on maven central will differ after this PR is merged. If it still fails after publishing a new snapshot, we can investigate why generated pom files behave differently than hand-crafted gradle files 😅

mergeJar("dev.langchain4j:langchain4j-mistral-ai")
mergeJar("dev.langchain4j:langchain4j-open-ai")
mergeJar("dev.langchain4j:langchain4j-google-ai-gemini")
requires("jtokkit")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced by addRuntimeOnlyDependency("com.knuddels:jtokkit") above which the requireAllDefinedDependencies() picks up,

exports("com.sun.javafx.scene")
opens("com.sun.javafx.application", "org.testfx")
opens("javafx.stage", "com.pixelduke.fxthemes")
opens("com.sun.javafx.tk.quantum", "com.pixelduke.fxthemes")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into some difficult to figure out situation regarding the javafx dependencies and their transitive dependencies. I wanted to limit the patching of them to the minimum to minimize confusion and clarify why patching is needed at all.

Now, all tests run and my (minimal) manual testing did not show any issues. If there is still some accessibility error at runtime now, the "opens" list here needs to be extended. But I would like to suggest to keep it explicit: use preserveExisting(), and then only add on top what is really needed.

configurations.named("${name}RuntimeClasspath") {
shouldResolveConsistentlyWith(mainRuntimeClasspath)
attributes.attributeProvider(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, jdkVersion)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add("org.openjfx:jdk-jsobject")
} else {
removeIf { it.name == "jdk-jsobject" }
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is solving the jsobject "issue" in a way @koppor and I talked about when this came up on slack. In theory, JavaFx could publish metadata that allows Gradle to automatically make a better decission.
This rule class is adding this metadata, which allows us to remove the copy-paste solution from individual build Gradle files.

@jjohannes
Copy link
Collaborator Author

This worked better than I thought. 😅

Feel free to take a look at this and test whenever you have time. I propose to add the dependency check to the pipeline, but you can also revert that part if you do not want that (yet).

Now, if code is modified, the check will tell if:

  • A requires should be added - a class that is only "by chance" on the module path has been used directly (as the Koltin IntRange I fixed in this PR)
  • A requires can be removed, because all usages from the code are gone

To add a new dependency in a module:

  • Just add the requires - no modification in build.gradle.kts needed
  • If the dependency is new:
    • Add version in versions/build.gradle.kts (as now)
    • Maybe add patch rule(s) (as now)
    • If no patch rule is needed, but the dependency is "exotic", you may need to add an entry to gradle/modules.properties that tells what the dependency behind a certain module name is. You will see a warning if this is needed.

@jjohannes jjohannes marked this pull request as ready for review February 20, 2026 16:09
@qodo-free-for-open-source-projects
Copy link
Contributor

Review Summary by Qodo

Activate full java-module-dependencies plugin and consolidate dependency definitions

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Activate java-module-dependencies plugin to define dependencies in module-info.java
• Remove redundant dependencies blocks from build.gradle.kts files
• Mark runtime-only dependencies with /*runtime*/ comments in module declarations
• Add dependency analysis CI pipeline step to validate module-info consistency
• Refactor test module configurations using testModuleInfo DSL
• Handle platform-specific JavaFX variants and JDK version-specific dependencies
Diagram
flowchart LR
  A["module-info.java files"] -->|define all dependencies| B["java-module-dependencies plugin"]
  B -->|validates consistency| C["dependency-analysis plugin"]
  C -->|reports unused/missing| D["checkAllModuleInfo task"]
  E["build.gradle.kts files"] -->|remove redundant blocks| F["cleaner build config"]
  G["Runtime-only deps"] -->|marked with comments| A
  H["Platform-specific variants"] -->|handled by metadata rules| B
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/module-info.java ✨ Enhancement +11/-9

Mark logging adapters as runtime-only dependencies

jabgui/src/main/java/module-info.java


2. jabkit/src/main/java/module-info.java ✨ Enhancement +4/-8

Remove unused dependencies and mark runtime-only

jabkit/src/main/java/module-info.java


3. jablib/src/main/java/module-info.java ✨ Enhancement +37/-42

Refactor dependencies with transitive and runtime markers

jablib/src/main/java/module-info.java


View more (24)
4. jablib/src/main/java/org/jabref/logic/ai/chatting/chathistory/storages/MVStoreChatHistoryStorage.java 🐞 Bug fix +3/-4

Remove kotlin.ranges.IntRange import and replace with loop

jablib/src/main/java/org/jabref/logic/ai/chatting/chathistory/storages/MVStoreChatHistoryStorage.java


5. jabls-cli/src/main/java/module-info.java ✨ Enhancement +6/-2

Remove transitive markers and add runtime logging dependencies

jabls-cli/src/main/java/module-info.java


6. jabls/src/main/java/module-info.java ✨ Enhancement +5/-5

Add jackson.core and mark transitive dependencies

jabls/src/main/java/module-info.java


7. jabsrv-cli/src/main/java/module-info.java ✨ Enhancement +3/-24

Remove transitive markers and simplify module requirements

jabsrv-cli/src/main/java/module-info.java


8. jabsrv/src/main/java/module-info.java ✨ Enhancement +16/-19

Mark dependencies as transitive and runtime-only appropriately

jabsrv/src/main/java/module-info.java


9. test-support/src/main/java/module-info.java ✨ Enhancement +9/-5

Mark all dependencies as transitive for test support

test-support/src/main/java/module-info.java


10. build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt ✨ Enhancement +55/-0

Add metadata rule for JDK version-specific jsobject handling

build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt


11. build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts ✨ Enhancement +75/-127

Activate java-module-dependencies and refactor patch rules

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts


12. build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts ✨ Enhancement +3/-0

Add dependency-analysis plugin configuration

build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts


13. build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts ✨ Enhancement +20/-0

Configure test suites and mockito agent setup

build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts


14. build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts ✨ Enhancement +1/-0

Add dependency check plugin to module configuration

build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts


15. build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts ✨ Enhancement +25/-3

Add target-specific classpath configuration with JVM version attributes

build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts


16. gradle/modules.properties ⚙️ Configuration changes +19/-0

Add module name to Maven coordinate mappings

gradle/modules.properties


17. jabgui/build.gradle.kts ✨ Enhancement +14/-144

Remove dependencies block and use testModuleInfo DSL

jabgui/build.gradle.kts


18. jabkit/build.gradle.kts ✨ Enhancement +9/-73

Remove dependencies block and use testModuleInfo DSL

jabkit/build.gradle.kts


19. jablib/build.gradle.kts ✨ Enhancement +43/-225

Remove large dependencies block and use testModuleInfo DSL

jablib/build.gradle.kts


20. jabls-cli/build.gradle.kts ✨ Enhancement +5/-33

Remove dependencies block and add mainModuleInfo

jabls-cli/build.gradle.kts


21. jabls/build.gradle.kts ✨ Enhancement +4/-18

Remove dependencies block and use testModuleInfo DSL

jabls/build.gradle.kts


22. jabsrv-cli/build.gradle.kts ✨ Enhancement +4/-84

Remove dependencies block and add mainModuleInfo

jabsrv-cli/build.gradle.kts


23. jabsrv/build.gradle.kts ✨ Enhancement +9/-65

Remove dependencies block and use testModuleInfo DSL

jabsrv/build.gradle.kts


24. test-support/build.gradle.kts ✨ Enhancement +0/-27

Remove dependencies block entirely

test-support/build.gradle.kts


25. versions/build.gradle.kts ✨ Enhancement +4/-23

Remove individual dependency declarations from platform

versions/build.gradle.kts


26. .github/actions/setup-gradle/action.yml Dependencies +1/-1

Update TestLens setup action to v1.7.0

.github/actions/setup-gradle/action.yml


27. .github/workflows/tests-code.yml ✨ Enhancement +13/-0

Add checkAllModuleInfo dependency validation CI step

.github/workflows/tests-code.yml


Grey Divider

Qodo Logo

@Siedlerchr Siedlerchr added this to the 6.0-alpha.6 milestone Feb 20, 2026
@qodo-free-for-open-source-projects
Copy link
Contributor

qodo-free-for-open-source-projects bot commented Feb 20, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (5) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Commented-out Lucene directives 📘 Rule violation ✓ Correctness
Description
The PR introduces commented-out uses/requires lines in module-info.java, leaving dead code in
place. This reduces readability and can cause confusion about which modules are actually required.
Code

jabgui/src/main/java/module-info.java[R166-170]

+    // uses org.apache.lucene.codecs.lucene103.Lucene103Codec;
+    // requires org.apache.lucene.analysis.common;
+    // requires org.apache.lucene.core;
+    // requires org.apache.lucene.highlighter;
+    // requires org.apache.lucene.queryparser;
Evidence
Compliance ID 11 forbids introducing commented-out code. The updated module-info.java now contains
multiple commented-out directives for Lucene that were previously active declarations.

AGENTS.md
jabgui/src/main/java/module-info.java[166-170]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Commented-out `uses`/`requires` directives were introduced in `module-info.java`, which violates the rule against commented-out code.
## Issue Context
These directives appear in the Lucene region and were previously active module declarations.
## Fix Focus Areas
- jabgui/src/main/java/module-info.java[166-170]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Mockito agent version mismatch 🐞 Bug ⛯ Reliability
Description
The shared test convention pins the Mockito javaagent to 5.18.0, while the repo’s central
constraints pin mockito-core to 5.21.0. This breaks the “single source of truth” for versions and
risks running tests with an agent version that diverges from the Mockito version used elsewhere in
the build.
Code

build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts[R59-63]

+// See https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
+val mockitoAgent = configurations.create("mockitoAgent")
+dependencies {
+    mockitoAgent("org.mockito:mockito-core:5.18.0") { isTransitive = false }
+}
Evidence
The build logic hard-codes Mockito 5.18.0 for the mockitoAgent configuration, but the versions
platform constrains Mockito to 5.21.0. With the new centralized setup, these should be aligned to
avoid inconsistent dependency management and potential agent/library incompatibilities.

build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts[59-63]
versions/build.gradle.kts[138-142]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`mockitoAgent` is pinned to `org.mockito:mockito-core:5.18.0` in the shared test convention plugin, but the repo’s `:versions` platform constrains Mockito to `5.21.0`. This introduces version divergence and can cause subtle issues if the agent and the Mockito library end up on different versions.
### Issue Context
The PR is explicitly trying to reduce dependency setup complexity and centralize declarations. Having a hard-coded Mockito version inside build-logic works against that goal.
### Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts[59-63]
- versions/build.gradle.kts[138-142]
### Suggested fix
Option A (simplest): change `5.18.0` to `5.21.0` in the `mockitoAgent(...)` declaration.
Option B (more in spirit of the PR): remove the explicit version in `mockitoAgent(&amp;amp;quot;org.mockito:mockito-core&amp;amp;quot;)` and ensure the `mockitoAgent` configuration participates in the same version alignment mechanism used for the rest of the build (e.g., by applying the platform/constraints to that configuration).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Fetcher tests silently skipped 🐞 Bug ⛯ Reliability
Description
The fetcherTest Gradle test task is now explicitly disabled, but the dedicated GitHub Actions
workflow still runs gradle fetcherTest. This will result in CI reporting success while running no
fetcher tests, reducing coverage for a critical area.
Code

jablib/build.gradle.kts[R288-290]

tasks.register<Test>("fetcherTest") {
+    enabled = false
  group = LifecycleBasePlugin.VERIFICATION_GROUP
Evidence
The workflow invokes gradle fetcherTest, but the task is configured with enabled = false, which
causes Gradle to skip it without failing. This makes the CI signal misleading and can let
regressions ship unnoticed.

jablib/build.gradle.kts[286-297]
.github/workflows/tests-code-fetchers.yml[48-63]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `fetcherTest` task is unconditionally disabled (`enabled = false`) in `jablib/build.gradle.kts`, but CI still runs `gradle fetcherTest`. This makes the Fetcher Tests workflow a false positive.
### Issue Context
There is a dedicated workflow `.github/workflows/tests-code-fetchers.yml` intended to validate fetcher behavior regularly and on relevant changes.
### Fix Focus Areas
- jablib/build.gradle.kts[286-297]
- .github/workflows/tests-code-fetchers.yml[48-63]
### Suggested fix
- Remove `enabled = false` so the task runs as expected.
If you need it off by default locally, gate it instead, e.g.:
- `enabled = providers.environmentVariable(&amp;amp;quot;CI&amp;amp;quot;).isPresent || providers.gradleProperty(&amp;amp;quot;enableFetcherTests&amp;amp;quot;).isPresent`
and update documentation/CI accordingly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. Grammar error: Can be remove 📘 Rule violation ✓ Correctness
Description
A newly added comment contains a grammatical error (Can be remove). This reduces professionalism
and clarity in documentation/comments.
Code

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[42]

+        // Can be remove once Java 26 is the minimum version JabRef is built with.
Evidence
Compliance ID 27 requires fixing typographical/grammatical errors in comments and documentation. The
new comment includes incorrect grammar.

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[41-42]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A newly added comment contains a grammatical error.
## Issue Context
This is in the `javafx-web` special-casing comment.
## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[41-42]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Typo: decared in comment 📘 Rule violation ✓ Correctness
Description
A newly added comment contains a spelling mistake (decared). This makes maintenance notes harder
to read and search.
Code

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[100]

+        // metadata decared these as runtime only, but they are 'requires transitive' in module-info
Evidence
Compliance ID 27 requires correcting spelling mistakes in comments. The introduced comment includes
a misspelling.

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[99-103]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A newly added comment contains a spelling mistake (`decared`).
## Issue Context
This comment documents a mismatch between metadata and `module-info` requirements.
## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[99-103]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Grammar error: if picked 📘 Rule violation ✓ Correctness
Description
A newly added comment contains a grammatical error (if picked). This reduces clarity of the
rationale being documented.
Code

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[R259-260]

+        // Required as sometimes the non-jpms version if picked which should ideally be fixed differently
+        // More details: https://github.com/gradlex-org/jvm-dependency-conflict-resolution/issues/346
Evidence
Compliance ID 27 requires correcting grammatical errors in comments. The introduced comment contains
incorrect phrasing (if picked instead of is picked).

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[259-260]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A newly added comment contains a grammatical error.
## Issue Context
This comment explains a workaround related to sometimes resolving a non-JPMS artifact.
## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[259-260]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
7. dependencyscopes job misspelled 📘 Rule violation ✓ Correctness
Description
The newly added GitHub Actions job identifier dependencyscopes is misspelled/unclear, reducing
self-documentation and discoverability in CI configuration. Using correct, intention-revealing names
helps ongoing maintenance.
Code

.github/workflows/tests-code.yml[R58-60]

+  dependencyscopes:
+    name: Dependency Scopes
+    runs-on: ubuntu-latest
Evidence
Compliance ID 2 requires identifiers to be meaningful and clearly named. The job key appears to be
intended as dependencyScopes/dependency-scopes but is introduced as dependencyscopes.

Rule 2: Generic: Meaningful Naming and Self-Documenting Code
.github/workflows/tests-code.yml[58-60]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The newly introduced GitHub Actions job id is misspelled/unclear (`dependencyscopes`).
## Issue Context
Job identifiers are part of the CI configuration and should be self-documenting.
## Fix Focus Areas
- .github/workflows/tests-code.yml[58-60]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +166 to +170
// uses org.apache.lucene.codecs.lucene103.Lucene103Codec;
// requires org.apache.lucene.analysis.common;
// requires org.apache.lucene.core;
// requires org.apache.lucene.highlighter;
// requires org.apache.lucene.queryparser;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Commented-out lucene directives 📘 Rule violation ✓ Correctness

The PR introduces commented-out uses/requires lines in module-info.java, leaving dead code in
place. This reduces readability and can cause confusion about which modules are actually required.
Agent Prompt
## Issue description
Commented-out `uses`/`requires` directives were introduced in `module-info.java`, which violates the rule against commented-out code.

## Issue Context
These directives appear in the Lucene region and were previously active module declarations.

## Fix Focus Areas
- jabgui/src/main/java/module-info.java[166-170]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit unclear to me. I could not find where this is needed. But maybe it cannot be completely removed (?)

If it is really not needed, we can remove this completely (and not comment it out).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask

This is a bit unclear to me. I could not find where this is needed. But maybe it cannot be completely removed (?) If it is really not needed, we can remove this completely (and not comment it out).

Answer:

In jabgui/src/main/java/module-info.java the Lucene directives were commented out because, after enabling checkAllModuleInfo / java-module-dependencies, the analysis apparently concluded that jabgui does not directly reference Lucene types anymore (or at least not in a way the module system sees), so the directives became “unused” from the perspective of that module.

Where Lucene is needed now is primarily jablib:

  • jablib/src/main/java/module-info.java still has the Lucene block, including the uses org.apache.lucene.codecs.lucene103.Lucene103Codec; and the requires ... for the Lucene modules (with some switched to transitive).
  • That means consumers that need Lucene “through” jablib should get the right modules via jablib’s declarations (especially where transitive is used).

So to your question: yes, if jabgui truly doesn’t use Lucene directly, you can remove these lines completely. Keeping them commented out is just dead code and does not help the build; it only preserves a “hint” to humans, but it makes the module descriptor less clear.

Suggested cleanup options:

  1. Best: remove the entire commented-out block in the Lucene region from jabgui/module-info.java.
  2. If you want to retain the rationale, keep a short explanatory comment only, e.g.:
    // Lucene is provided via jablib; jabgui does not depend on it directly.

One thing to double-check before deleting:

  • Ensure jabgui does not import any org.apache.lucene.* classes directly (IDE “Find in module”).
  • If it does (e.g., a UI class directly uses a QueryParser or Analyzer), then the correct fix is not commented-out lines, but re-adding the required Lucene modules in jabgui (or making the relevant Lucene requirements transitive in jablib if the types “leak” through exported APIs).

Given the diff as-is, there’s no indication that Lucene is “special runtime-only” for jabgui; it looks simply unused there, so removing it entirely should be safe and clearer.

api("org.glassfish.jersey.core:jersey-server")
api("org.glassfish.jersey.inject:jersey-hk2")
api("org.glassfish.jersey.test-framework:jersey-test-framework-core")
api("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generally not correct most of the time. If you add a dependency to a module (a JAR) here - i.e. a dependency without platform(...) – it means the dependency is used on all module paths. This is usually never what you want. For example, before this change the test dependencies listed here were also part of the runtime module path to package JabRef and likely ended up in the application package.

This file should only be used for versions. Only because a BOM is not a version on it's own, but metadata that contains versions, we have the dependencies {} block. But as a BOM does not contain a Jar (it's only metadata) it is correct to use the dependencies {} block only for BOM (platform) dependencies here.

The name is taken from module-info by default
(by java-module-dependencies plugin that parses the file).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants